package com.lastproject.dto;

import java.io.Serializable;

public class AnswerStatsDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6296665286898625869L;
	private int id;
	private String personalAnswer;
	private int IdquestionOption;
	private int IdUser;
	private AnswerDTO answerDTO;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPersonalAnswer() {
		return personalAnswer;
	}

	public void setPersonalAnswer(String personalAnswer) {
		this.personalAnswer = personalAnswer;
	}

	public int getIdquestionOption() {
		return IdquestionOption;
	}

	public void setIdquestionOption(int idquestionOption) {
		IdquestionOption = idquestionOption;
	}

	public int getIdUser() {
		return IdUser;
	}

	public void setIdUser(int idUser) {
		IdUser = idUser;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + IdUser;
		result = prime * result + IdquestionOption;
		result = prime * result + id;
		result = prime * result
				+ ((personalAnswer == null) ? 0 : personalAnswer.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AnswerStatsDTO other = (AnswerStatsDTO) obj;
		if (IdUser != other.IdUser)
			return false;
		if (IdquestionOption != other.IdquestionOption)
			return false;
		if (id != other.id)
			return false;
		if (personalAnswer == null) {
			if (other.personalAnswer != null)
				return false;
		} else if (!personalAnswer.equals(other.personalAnswer))
			return false;
		return true;
	}
	
	

	public AnswerStatsDTO() {
		super();
	}

	public AnswerStatsDTO(int id, String personalAnswer, int idquestionOption,
			int idUser) {
		super();
		this.id = id;
		this.personalAnswer = personalAnswer;
		IdquestionOption = idquestionOption;
		IdUser = idUser;
	}

	public AnswerDTO getAnswerDTO() {
		return answerDTO;
	}

	public void setAnswerDTO(AnswerDTO answerDTO) {
		this.answerDTO = answerDTO;
	}

	
}
